from django import template
from django.conf import settings

register = template.Library()

@register.simple_tag
def formset_js():
    min = '' if getattr(settings, 'TEMPLATE_DEBUG',) else '.min'
    return '<script src="%sjs/jquery.formset%s.js"></script>' % (settings.STATIC_URL, min)
